home *** CD-ROM | disk | FTP | other *** search
/ ASP Advantage 1993 / The Association of Shareware Professionals Advantage CD-ROM 1993.iso / files / utilties / match201 / match.doc next >
Text File  |  1990-11-30  |  21KB  |  529 lines

  1.  
  2.  
  3.  
  4.  
  5.                                MATCH (Ver. 2.01)
  6.                           Copyright (C) 1990 SOFTWEST
  7.                               All Rights Reserved.
  8.        
  9.                              _______
  10.                         ____|__     |               (tm)
  11.                      --|       |    |-------------------
  12.                        |   ____|__  |  Association of
  13.                        |  |       |_|  Shareware
  14.                        |__|   o   |    Professionals
  15.                      -----|   |   |---------------------
  16.                           |___|___|    MEMBER
  17.        
  18.        
  19.                          5120 Campbell Ave. Suite 216
  20.                               San Jose, CA 95130
  21.                                 (408) 370-7095
  22.                                 (408) 370-7096 (FAX)
  23.                                 CIS: 70205,533 (Tom Crosley)
  24.        
  25.  
  26.  
  27.        Packing List
  28.        ------------
  29.  
  30.        The complete MATCH 2.0 evaluation package (typically compressed
  31.        into a .ZIP or self-extracting .EXE file) should contain the
  32.        following files.  Please be sure that each file is present.  If
  33.        any of these files are missing then the package is not complete
  34.        and is not suitable for distribution to others. 
  35.  
  36.            File Name:                Purpose of File:
  37.            ------------   -----------------------------------------
  38.        
  39.            MATCH.DOC      This text file.  User manual, warranty
  40.                           disclaimer, plus information on registering
  41.                           your copy of MATCH.
  42.        
  43.            MATCH.EXE      The executable program for IBM PC/XT/AT/PS2
  44.                           and 100% compatible computers running
  45.                           MS-DOS/PC-DOS 2.10 or later with a minimum
  46.                           of 256K RAM (and any compatible display).
  47.        
  48.            MATCHDEM.OLD   Sample file
  49.        
  50.            MATCHDEM.NEW   Sample file with minor differences
  51.        
  52.            ORDER.DOC      Self-contained order form/mailer
  53.        
  54.            SYSOP.DOC      Information for Bulletin Board System
  55.                           distribution.
  56.        
  57.            VENDOR.DOC     Information and restrictions for disk vendors,
  58.                           distributors, user groups, and more.
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                      - 1 -
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.        Disclaimer of Warranty
  72.        ----------------------
  73.  
  74.        Users of MATCH must accept this disclaimer of warranty: 
  75.  
  76.            "MATCH 2.0 is supplied as is.  SOFTWEST disclaims all
  77.             warranties, expressed or implied, including, without
  78.             limitation, any warranties of merchantability or
  79.             fitness for any purpose. 
  80.  
  81.             SOFTWEST does not assume any liability for the use of
  82.             this software beyond the original purchase price of
  83.             this software. 
  84.  
  85.             In no event will SOFTWEST be liable to you for any
  86.             additional damages, including any lost profits, lost
  87.             savings or other incidental or consequential damages
  88.             arising from the use of, or inability to use, this
  89.             software, even if SOFTWEST has been advised of the
  90.             possibility of such damages."
  91.  
  92.  
  93.  
  94.        This program is produced by a member of the Association of
  95.        Shareware Professionals (ASP).  ASP wants to make sure that the
  96.        shareware principle works for you. If you are unable to resolve a
  97.        shareware-related problem with an ASP member by contacting the
  98.        member directly, ASP may be able to help. The ASP Ombudsman can
  99.        help you resolve a dispute or problem with an ASP member, but
  100.        does not provide technical support for members' products. Please
  101.        write to the ASP Ombudsman at P.O. Box 5786, Bellevue, WA 98006
  102.        or send a Compuserve message via easyplex to ASP Ombudsman
  103.        70007,3536. 
  104.  
  105.  
  106.  
  107.        Overview
  108.        --------
  109.  
  110.        MATCH is a program designed to compare documents line by line.
  111.        For a summary of program usage and options, simply run MATCH with
  112.        no parameters.  To compare two files run MATCH from the DOS
  113.        command line with the following parameters:
  114.  
  115.             C>MATCH  old_file_name  new_file_name
  116.  
  117.        MATCH will process each file and display the old file's line
  118.        numbers on the left and the new file's line numbers on the
  119.        right.  Each lines contents will be appropriately displayed to
  120.        the right of each file's line numbers.  If there is a mismatch,
  121.        the incompatible lines will be displayed as a deletion from the
  122.        old file and/or an addition to the new file.  Enter:
  123.  
  124.             C>MATCH  MATCHDEM.OLD  MATCHDEM.NEW
  125.  
  126.        and the following is displayed: 
  127.  
  128.  
  129.  
  130.                                      - 2 -
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.             MATCHDEM.OLD
  138.                    MATCHDEM.NEW
  139.        
  140.                  1     1           Line 111
  141.                  |     |
  142.                  3     3           Line 333
  143.             +------------------------------------------------------
  144.             |    4       /DELETED/ Line 555
  145.             |    5       /DELETED/ Line 444
  146.             |
  147.             |          4 **ADDED** Line 444
  148.             |          5 **ADDED** Line 555
  149.             +------------------------------------------------------
  150.                  6     6           Line 666
  151.                  |     |
  152.                  8     8           Line 888
  153.  
  154.        In the above example, the author of the two files had two lines
  155.        reversed in his old version.  In the newer version of his
  156.        document, the lines were in numerical order.  Try this example
  157.        yourself; the two files are included in the package. 
  158.  
  159.             MATCH takes wildcards such as: *.BAT or FILE??.D* For
  160.        example, to match two versions of C language source files
  161.        contained in directories VER1 and VER2, you could type: 
  162.  
  163.             C>MATCH VER1\*.C VER2
  164.  
  165.        and MATCH would compare each file with a .C extension in
  166.        directory VER1 with its counterpart in directory VER2. 
  167.  
  168.        If a list of specific files needs to be matched on a repetitive
  169.        basis, use @files.  @Files contain just filenames, with or
  170.        without wildcards.  For example:
  171.  
  172.                                      where:    @L1            @L2
  173.                                                ---            ---  
  174.             C>MATCH @L1 @L2                    THIS.C         D:*.C
  175.                                                TEST3          \T\TEST?
  176.                                                TEST5
  177.                                                TEST7
  178.  
  179.        If the above is executed, MATCH will attempt to compare the
  180.        following pairs of files:
  181.  
  182.             .\THIS.C       D:.\THIS.C
  183.             .\TEST3.       \T\TEST3.
  184.             .\TEST5.       \T\TEST5.
  185.             .\TEST7.       \T\TEST7.
  186.  
  187.        MATCH uses the same algorithm with respect to wildcards that the
  188.        DOS 'COMP' command uses.  This method assumes that the set of
  189.        files represented by the second file name (using wildcards and/or
  190.        an @file), is a subset of the set of files represented by the
  191.        first file name (also using wildcards and/or an @file). 
  192.  
  193.  
  194.  
  195.  
  196.                                      - 3 -
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.        Options
  204.        -------
  205.  
  206.        The options must be preceded by one of these symbols: -, +, or /.
  207.        Options may be typed in upper or lower case.  Each option must be
  208.        entered separately (surrounded by spaces): 
  209.  
  210.             -A        Ask user for confirmation before displaying more
  211.                       lines to the screen when it fills up.
  212.        
  213.                       This option controls output to console (screen)
  214.                       allowing the user to display the next line of the
  215.                       match session (by pressing Enter), the next page
  216.                       (by pressing the Space bar), or to skip the rest
  217.                       of the current file comparison and start the next
  218.                       one (by pressing the Esc key).  The latter works
  219.                       only with filenames containing wildcards or '@'
  220.                       (response) files.
  221.        
  222.             -Bnnnnn   With this option, increase the maximum number of
  223.                       lines that MATCH can handle at a given time. 
  224.                       nnnnn is the maximum number of lines and must be
  225.                       less than 65536.  The corresponding buffer size
  226.                       can be determined by: 
  227.        
  228.                            size = (#lines * 2files * 4bytes)
  229.        
  230.                       Since the default number of lines is 20,000 (same
  231.                       as -B20000), the default buffer size is: 
  232.        
  233.                            (20,000 * 2 * 4) = 160,000 bytes
  234.        
  235.                       This number (160 KBytes) can be added to the
  236.                       program length plus about 20 KBytes to find the
  237.                       total amount of memory needed to run MATCH.  
  238.        
  239.             -C[n[,n]] Use this option to send codes (condensed, etc.) to
  240.                       the printer.  -C alone sends a condensed code for
  241.                       Epson printers (15 decimal, 0F hex).  To send
  242.                       several codes, just separate them by commas:
  243.                       '-C1,2,3,4,5'.  
  244.        
  245.             -Dnnn     Increase the comparison depth with this option. 
  246.                       MATCH defaults to comparing 150 (same as -D150)
  247.                       lines before assuming there is no match for the
  248.                       current line compared in the other file.  If
  249.                       your files have deleted or added text larger than
  250.                       150 lines use this option.  
  251.        
  252.             -F        Ignore any existing form feeds.  Only applies when
  253.                       -S is used also.
  254.        
  255.             -H        Displays a help screen.  This option is useful
  256.                       when you have typed a long line of filenames and
  257.                       options, and then need some help.  Type -h Enter,
  258.                       and the help screen is displayed.  To continue
  259.                       where you left off, press F3 and backspace twice.
  260.        
  261.  
  262.                                      - 4 -
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.             -I        Ignores case during file comparison.
  270.        
  271.             -J        With this option, MATCH will not display any
  272.                       information about files that match exactly.  This
  273.                       is a contrast to the -L option which displays all
  274.                       lines, no matter what.  
  275.        
  276.             -L        Display all lines, not just those not found in the
  277.                       other file.  
  278.        
  279.             -Mnnn     Number of consecutive lines that must match or
  280.                       they will be rejected as an addition/deletion. 
  281.                       Used to avoid falsely matching up on common
  282.                       sequences of lines that might be found several
  283.                       times in the same document (such as blank lines)
  284.                       or language files (such as end of functions).
  285.        
  286.                       MATCH defaults to 4 lines (same as -M4) that must
  287.                       match.  Consider the case where the following was
  288.                       produced by MATCH: 
  289.        
  290.                            FILE.OLD
  291.                                   FILE.NEW
  292.        
  293.                                 1     1           1111
  294.                            +---------------------------------------
  295.                            |    2       /DELETED/ 2222
  296.                            |    3       /DELETED/ 3333
  297.                            |    4       /DELETED/ 4444
  298.                            |    5       /DELETED/ 5555
  299.                            |
  300.                            |          2 **ADDED** AAAA
  301.                            |          3 **ADDED** 3333
  302.                            |          4 **ADDED** 4444
  303.                            |          5 **ADDED** BBBB
  304.                            +---------------------------------------
  305.                                 6     6           6666
  306.                                 |     |
  307.                                 8     8           8888
  308.        
  309.                       If MATCH was rerun with the -M2 OR -M1 option,
  310.                       MATCH would then display the following: 
  311.        
  312.                            FILE.OLD
  313.                                   FILE.NEW
  314.        
  315.                                 1     1           1111
  316.                            +---------------------------------------
  317.                            |    2       /DELETED/ 2222
  318.                            |
  319.                            |          2 **ADDED** AAAA
  320.                            +---------------------------------------
  321.                                 3     3           3333
  322.                                 |     |
  323.  
  324.  
  325.  
  326.  
  327.  
  328.                                      - 5 -
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.                                 4     4           4444
  336.                            +---------------------------------------
  337.                            |    5       /DELETED/ 5555
  338.                            |
  339.                            |          5 **ADDED** BBBB
  340.                            +---------------------------------------
  341.                                 6     6           6666
  342.                                 |     |
  343.                                 8     8           8888
  344.        
  345.             -P        Paginate MATCH's output.  With this option only,
  346.                       MATCH displays the files' date and time of last
  347.                       modification.  MATCH will also put the current
  348.                       date and page number at the top of each page,
  349.                       and in the case of wildcards, start each pair
  350.                       of files on a new page.
  351.        
  352.             -R        Displays registration information and an order
  353.                       form.  To print a copy of the order form, type: 
  354.        
  355.                            C>MATCH -R > PRN, 
  356.        
  357.                       and the instructions will remain on the screen
  358.                       while the form will be sent to the printer.  
  359.        
  360.             -S        Ignore spaces and tabs when matching.  
  361.        
  362.             -T        Change tab size.  The default is 8 spaces per tab. 
  363.                       Use this option when the input files were created
  364.                       in an environment having a different tab size.
  365.        
  366.             -Vnnn     Vertical spacing, or lines per page.  This only
  367.                       applies with the -P option, and defaults to 54
  368.                       lines per page (same as -V54).  This of course is
  369.                       for 6 lines per vertical inch.  For 8 lines/inch
  370.                       use -V76.  
  371.        
  372.             -W        Disallow wrapping of long lines (i.e., truncate
  373.                       the lines longer than the screen is wide).
  374.  
  375.  
  376.        The following line will print, in condensed mode and paginated,
  377.        just the differences between all files in directories ONE and
  378.        TWO: 
  379.  
  380.             C>MATCH -c -j -p ONE TWO >prn
  381.  
  382.        Or, you could redirect the output to a file first, and then print
  383.        the file using DOS's background PRINT command. 
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.                                      - 6 -
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.        Error Codes and Messages
  402.        ------------------------
  403.  
  404.        MATCH returns a status code upon program termination, which can
  405.        be tested with the DOS IF ERRORLEVEL command.  The status code
  406.        for MATCH is the number of file comparisons with mismatches that
  407.        occurred.  This means that if ten file pairs were matched, and
  408.        two pairs mismatched at least once the DOS status code will be
  409.        2. 
  410.  
  411.             However, there is one exception.  If there is some type of
  412.        error, such as not being able to find the files, or lacking
  413.        sufficient memory for the comparison, the DOS status code is
  414.        255. 
  415.  
  416.             To efficiently match very large files, up to 65535 lines
  417.        (not bytes) each, MATCH does its comparisons using a 32-bit hash
  418.        code of each line.  It is possible, but unlikely, for two
  419.        different lines to have the same hash code.  In this case, the
  420.        difference is not noticed until the second pass when the files
  421.        are listed, and is output as a "jackpot". 
  422.  
  423.  
  424.        History
  425.        -------
  426.  
  427.        An early version of MATCH was written in SNOBOL4 by Tom Crosley
  428.        on an IBM mainframe around 1970.  It was rewritten in PL/M ten
  429.        years later when Tom started his consulting company (SOFTWEST),
  430.        and was used on several micros.  This latest version, written in
  431.        C, was done by Devon Sumner who also works for SOFTWEST. 
  432.  
  433.  
  434.        Shareware
  435.        ---------
  436.  
  437.        Shareware distribution gives users a chance to try software
  438.        before buying it.  If you try a Shareware program and continue
  439.        using it, you are expected to register. 
  440.  
  441.             Copyright laws apply to both Shareware and commercial
  442.        software, and the copyright holder retains all rights, with a few
  443.        specific exceptions as stated below.  Shareware authors are
  444.        accomplished programmers, just like commercial authors, and the
  445.        programs are of comparable quality.  (In both cases, there are
  446.        good programs and bad ones!) The main difference is in the method
  447.        of distribution.  The author specifically grants the right to
  448.        copy and distribute the software, either to all or to a specific
  449.        group. 
  450.  
  451.             Shareware is a distribution method, not a type of software.
  452.        You should find software that suits your needs and pocketbook,
  453.        whether it's commercial or Shareware.  The Shareware system makes
  454.        fitting your needs easier, because you can try before you buy.
  455.        And because the overhead is low, prices are low also.  Shareware
  456.        has the ultimate money-back guarantee -- if you don't use the
  457.        product, you don't pay for it. 
  458.  
  459.  
  460.                                      - 7 -
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.             MATCH 2.0 is a "shareware program" and is provided at no
  468.        charge to the user for evaluation.  Feel free to share it with
  469.        your friends, but please do not give it away altered or as part
  470.        of another system.  The essence of "user-supported" software is
  471.        to provide personal computer users with quality software without
  472.        high prices, and yet to provide incentive for programmers to
  473.        continue to develop new products. 
  474.  
  475.  
  476.        Registration
  477.        ------------
  478.  
  479.        If you find this program useful and find that you are using MATCH
  480.        and continue to use MATCH after a 21-day trial period, you must
  481.        register it by sending a payment of $25.00 to SOFTWEST.  To print
  482.        out a registration form, either run the program with the -R
  483.        option, e.g. 
  484.  
  485.            MATCH -R >PRN
  486.  
  487.        or print the file ORDER.DOC (which is a combination order form
  488.        and self-contained mailer): 
  489.  
  490.            PRINT ORDER.DOC
  491.  
  492.        When you register, you will be entitled to technical support.
  493.        You will also receive a disk containing the latest version of the
  494.        program, including the source code for MATCH set up to compile
  495.        under both Microsoft C 5.1/6.0 and Turbo C 2.0. 
  496.  
  497.             The $25.00 registration fee will license one copy for use on
  498.        any one computer at any one time.  You must treat this software
  499.        just like a book.  An example is that this software may be used
  500.        by any number of people and may be freely moved from one computer
  501.        location to another, so long as there is no possibility of it
  502.        being used at one location while it's being used at another. 
  503.  
  504.             Anyone distributing MATCH 2.0 for any kind of remuneration
  505.        must first contact SOFTWEST (see VENDOR.DOC for more
  506.        information).  This authorization will be automatically granted
  507.        to distributors recognized by the Association of Shareware
  508.        Professionals (ASP) as adhering to its guidelines for shareware
  509.        distributors, and such distributors may begin offering MATCH 2.0
  510.        immediately. 
  511.  
  512.             You are encouraged to pass a copy the shareware version of
  513.        MATCH 2.0 along to your friends for evaluation.  Please encourage
  514.        them to register their copy if they find that they can use it. 
  515.  
  516.             By registering your copy of MATCH 2.0, you will be
  517.        encouraging future versions of the program.  I hope you enjoy
  518.        using MATCH, and let me know what you would like to see in the
  519.        next version. 
  520.  
  521.                                                        -- Tom Crosley
  522.                                                           November, 1990
  523.  
  524.  
  525.  
  526.                                      - 8 -
  527.  
  528.  
  529.